package com.example.demo;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductRepository extends JpaRepository<Product, Long> {
    // 自定义查询方法
    List<Product> findByName(String name);
    List<Product> findByPriceLessThan(double price);
}
